package ModelLayer;

import java.util.ArrayList;


public class SalesOrder {
	private int orderId;
	private String date;
	private double totalPrice;
	private String deliveryStatus;
	private String deliveryDate;
	private double freightPrice;
	private boolean CODCharge;
	private double discount;
	private Customer c;
	private ArrayList<PartOrder> po;
	private Invoice i;


	/*
	 * Constructor
	 */
	public SalesOrder (int orderId, String date, double totalPrice, String deliveryStatus, String deliveryDate, double freightPrice, boolean CODCharge, double discount, Customer c, ArrayList<PartOrder> po, Invoice i) {
		this.orderId = orderId;
		this.date = date;
		this.totalPrice = totalPrice;
		this.deliveryStatus = deliveryStatus;
		this.deliveryDate = deliveryDate;
		this.freightPrice = freightPrice;
		this.CODCharge = CODCharge;
		this.discount = discount;
		this.c = c;
		this.po = po;
		this.i = i;
	}

	/*
	 * Empty constructor
	 */
	public SalesOrder() {
		orderId = 0;
		date = "";
		totalPrice = 0;
		deliveryStatus = "";
		deliveryDate = "";
		freightPrice = 0;
		CODCharge = false;
		discount = 0;
		c = null;
		po = new ArrayList<PartOrder>();
		i = null;
	}

	/*
	 * Set and get methods
	 */
	public int getOrderId() {
		return orderId;
	}

	public void setOrderId(int orderId) {
		this.orderId = orderId;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public double getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(double totalPrice) {
		this.totalPrice = totalPrice;
	}

	public String getDeliveryStatus() {
		return deliveryStatus;
	}

	public void setDeliveryStatus(String deliveryStatus) {
		this.deliveryStatus = deliveryStatus;
	}

	public String getDeliveryDate() {
		return deliveryDate;
	}

	public void setDeliveryDate(String deliveryDate) {
		this.deliveryDate = deliveryDate;
	}

	public double getFreightPrice() {
		return freightPrice;
	}

	public void setFreightPrice(double freightPrice) {
		this.freightPrice = freightPrice;
	}

	public boolean isCODCharge() {
		return CODCharge;
	}

	public void setCODCharge(boolean cODCharge) {
		CODCharge = cODCharge;
	}

	public double getDiscount() {
		return discount;
	}

	public void setDiscount(double discount) {
		this.discount = discount;
	}

	public Customer getC() {
		return c;
	}

	public void setC(Customer c) {
		this.c = c;
	}

	public ArrayList<PartOrder> getPo() {
		return po;
	}

	public void setPo(PartOrder partOrder) {
		po.add(partOrder);
	}

	public Invoice getI() {
		return i;
	}

	public void setI(Invoice i) {
		this.i = i;
	}

}
